<%= error_messages_for :incentive, :incentive_image %>
<% form_for(@incentive,
            :html => { :multipart => true }) do |f| %>

  <p>
    <%= f.label :package_id %><br />
    <%= collection_select(:incentive, :package_id, Package.find(:all), :id, :name, {:prompt => true}) %>
  </p>
  <p>
    <%= f.label :goal %><br />
    <%= f.text_field :goal %>
  </p>
  <p>
    <%= f.label :reward %><br />
    <%= f.text_area :reward %>
  </p>

	<p> 
	<%= label :incentive, :incentive_image %> <br />
	<%= image_for(@incentive, :small) %><br />
	<%= file_field_tag :incentive_image_file %> <br />
	<span class="hint"> 
	You may use JPEG, GIF, or PNG files up to 500 KB. 
	</span>
	</p>
	
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @incentive %> |
<%= link_to 'List', incentives_path %>
